package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 42
 * @date 2025/4/1
 * @Description
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * 批量插入订单详情数据
     * @param list
     */
    void insertBatch(List<OrderDetail> list);

    /**
     * 根据id查询订单
     * @param orderId
     * @return
     */
    @Select("SELECT * FROM order_detail WHERE order_id = #{orderId}")
    List<OrderDetail> list(Long orderId);
}
